<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>床位查询</title>
</head>
<body>
<div class="easyui-panel" data-options="fit:true,onOpen:dynamicqueryLivePatient,border:false">
	<div class="easyui-layout" data-options="fit:true">
		<div data-options="region:'center',border:false"
			style="padding: 2px; border-left: none;">

			<div id="search_livein">
				<span
					style="font-size: 15px; font-weight: bold; font-style: italic; text-decoration: underline;">条件查询：</span>
				<input prompt="姓名"  class="easyui-textbox" id="live_in_manage_name" 
					data-options="width:'5%'">
				<select prompt="科室" class="easyui-combobox" id="live_in_manage_office"
					data-options="url:'to_QueryLiveOffice',panelMaxHeight:'200px',panelHeight:'auto',width:'6%',
					valueField:'text',textField:'text',onChange:dynamicqueryLivePatient">
				</select>
			    <input  prompt="起止日期" class="easyui-datebox"  id="live_in_manage_afterdate"
			    data-options="width:'8%',onChange:checkDateSelect">至
				<input prompt="截至日期" class="easyui-datebox"   id="live_in_manage_beforedate"
				data-options="width:'8%',onChange:checkDateSelect"> 
				<select
					class="easyui-combobox" prompt="性别"   id="live_in_manage_sex"
					data-options="panelHeight:'auto',width:'5%',onChange:dynamicqueryLivePatient">
					<option></option>
					<option>男</option>
					<option>女</option>
				</select> <a class="easyui-linkbutton" iconCls="icon-search" onClick="queryALLpatient()">查询全部</a> <span
					style="margin-left: 50px; font-size: 16px; font-weight: bold; font-style: italic; text-decoration: underline;">功能操作：</span>
				<a class="easyui-linkbutton" iconCls="icon-add" 
					onclick="openWindowAddLiveIn()">新增入院登记</a>
					<a class="easyui-linkbutton" iconCls="icon-search" 
					onclick="openWindowVisiterQuery()">访客记录</a> <a
					class="easyui-linkbutton" iconCls="icon-edit" onclick="">打印</a> <span
					style="margin-left: 10px;">当前住院人数：216人</span>
			</div>
			
			
			<table class="easyui-datagrid" id="live_in_manage_table"
				data-options="singleSelect:true,fitColumns: true, 
				nowrap: false,border:false,fit:true,rownumbers:true,
				title:'住院病人信息',toolbar:'#search_livein',
				pagination:true,pageList: [15,30,40,50],pageSize: 15
				">
				<thead>
					<tr>
						<th data-options="field:'liveid8',width:35,align:'center'">住院号</th>
						<th data-options="field:'livetypename',width:30,align:'center'">住院类型</th>
						<th data-options="field:'liveoffice4',width:20,align:'center'">科室</th>
						<th data-options="field:'livedate',width:35,align:'center'">入院时间</th>
						<th data-options="field:'patientname8',width:20,align:'center'">姓名</th>
						<th data-options="field:'patientsex',width:10,align:'center'">性别</th>
						<th data-options="field:'patientage',width:15,align:'center'">年龄</th>
						<th data-options="field:'patienttel',width:25,align:'center'">联系电话</th>
						<th data-options="field:'livestatus',width:15,align:'center'">住院状态</th>
						<th data-options="field:'caozuo',width:70,formatter: LiveInHandle,align:'center'">操作</th>
					</tr>
				</thead>
			</table>
		</div>
	</div>



	<div id="windowAddLineIn" class="easyui-window" title="新增入院登记"
		data-options="collapsible:false,minimizable:false,maximizable:false,
		modal:true,iconCls:'icon-add',closed:true"
		style="width: 900px; height: 430px; padding: 2px;">
		<div class="easyui-layout" data-options="fit:true">
			<div data-options="region:'center',href:'to_new_hspt_live_in'"
				style="padding: 1px;"></div>

			<div data-options="region:'south',border:false"
				style="text-align: right; padding: 5px 0 0;">
				<a class="easyui-linkbutton"
					data-options="iconCls:'icon-save', plain:true"
					href="javascript:void(0)" onclick="addLiveInRecode()">提交</a> <a
					class="easyui-linkbutton"
					data-options="iconCls:'icon-cancel', plain:true"
					href="javascript:void(0)"
					onclick="javascript: $('#windowAddLineIn').window('close');$('#addLiveInForm').form('reset');">取消</a>
			</div>
		</div>
	</div>
	
	<div id="windowVisiterQuery" class="easyui-window" title="查看访客记录"
		data-options="collapsible:false,minimizable:false,maximizable:false,
		modal:true,iconCls:'icon-add',closed:true,onOpen:initVisitorTable"
		style="width:650px; height: 600px; padding: 2px;">
		<div class="easyui-layout" data-options="fit:true">
			<div data-options="region:'center',href:'to_hspt_visiter_query'"
				style="padding: 1px;"></div>
				
			<div data-options="region:'south',border:false"
				style="text-align: right; padding: 5px 0 0;">
				 <a class="easyui-linkbutton"
					data-options="iconCls:'icon-cancel', plain:true"
					href="javascript:void(0)"
					onclick="javascript: $('#windowVisiterQuery').window('close');">关闭</a>
			</div>
		</div>
	</div>

	<div id="windowPatientQuery" class="easyui-window" title="查看病人详情"
		data-options="collapsible:false,minimizable:false,maximizable:true,
		modal:true,iconCls:'icon-add',closed:true"
		style="width: 90%; height: 90%; padding: 2px;">
	</div>
	
	<div id="windowAddVisiter" class="easyui-window" title="新增访客窗口"
		data-options="collapsible:false,minimizable:false,maximizable:false,
		modal:true,iconCls:'icon-add',closed:true,onOpen:initVisitorID"
		style="width: 450px; height: 350px; padding: 2px;">
		<div class="easyui-layout"
			data-options="fit:true">
			<div data-options="region:'center',href:'to_hspt_visiter_add'"
				style="padding: 1px;"></div>
			<div data-options="region:'south',border:false"
				style="text-align: right; padding: 5px 0 0;">
				<a class="easyui-linkbutton"
					data-options="iconCls:'icon-save', plain:true"
					href="javascript:void(0)" onclick="onSubmitAddVisiterFrom()">提交</a>
				<a class="easyui-linkbutton"
					data-options="iconCls:'icon-cancel', plain:true"
					href="javascript:void(0)"
					onclick="javascript: $('#windowAddVisiter').window('close');$('#from_visitor_add').form('reset');">取消</a>
			</div>
		</div>
	</div>
</div>
	<script type="text/javascript">
	
	//住院操作按钮
    var LiveInHandle = function(value,row,index){
	var btn1 = "<input onclick='onBookPatient("+index +")' class='live_in_manage_bt'  type='button' value='查看详情'>";
	var btn2 = "<input onclick='onAddVisiter("+index +")'  class='live_in_manage_bt'  type='button' value='新增访客记录'>";
	return btn1 + btn2 ;
	}
	</script>
	<style type="text/css">
	.live_in_manage_bt{ 
	margin: 2px 8px 2px 0px;
	height:25px;
	border-radius: 3px;
	font-size: 14px;
	border: 1px #3366FF solid;
	background: #3399FF;
	color: white;
	}
	</style>
</body>
</html>